/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bibliOnline.task;

import bibliOnline.db.DBConnection;
import java.sql.PreparedStatement;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author luca
 */
public class ExpiredBookingTask implements Runnable {

    public static final String SQL = "CALL DELETE_EXPIRED_BOOKING()";
    private PreparedStatement statement;

    @Override
    public void run() {
	try {
	    statement = DBConnection.prepareStatement(SQL);
	    statement.execute();

	    statement.close();
	} catch (Exception ex) {
	    Logger.getLogger(ExpiredBookingTask.class.getName()).log(Level.SEVERE, null, ex);
	}
    }
}
